import { defineStore } from 'pinia';

export const LoginStore = defineStore('login', {
    state: () => {
        return {
            idcode: localStorage.getItem("idcode"),
        }
    },
    getters: {},
    actions: {
        Unidcode(payload) {
            this.idcode = payload;
            localStorage.setItem("idcode", payload);
        }
    },
    // 数据持久化
    // persist: {
    //     enabled: true
    // }
})